import request from '@/utils/request'

// 查询订单商品信息列表
export function listCash_goods(query) {
  return request({
    url: '/energize/cash_goods/list',
    method: 'get',
    params: query
  })
}

// 查询订单商品信息详细
export function getCash_goods(id) {
  return request({
    url: '/energize/cash_goods/' + id,
    method: 'get'
  })
}

// 新增订单商品信息
export function addCash_goods(data) {
  return request({
    url: '/energize/cash_goods',
    method: 'post',
    data: data
  })
}

// 修改订单商品信息
export function updateCash_goods(data) {
  return request({
    url: '/energize/cash_goods',
    method: 'put',
    data: data
  })
}

// 删除订单商品信息
export function delCash_goods(id) {
  return request({
    url: '/energize/cash_goods/' + id,
    method: 'delete'
  })
}

export function listCigaretteSales(query) {
  return request({
    url: '/energize/cash_goods/listCigaretteSales',
    method: 'get',
    params: query
  })
}

export function getCigarettePriceRange(query) {
  return request({
    url: '/energize/cash_goods/getCigarettePriceRange',
    method: 'get',
    params: query
  })
}
